/**
 * 
 */
package com.xb.demo14.filterchian;

/**
 * @author kexue
 *
 */
public class TestMain {

	public static void main(String[] args) {

		AbstractLogFilter rootChain = buildChain();

		rootChain.logMessage(" this is a error "); 
	}

	/**
	 * 
	 */
	private static AbstractLogFilter buildChain() {
		AbstractLogFilter consoleLogger = new ConsoleLogger();
		AbstractLogFilter fileLogger = new FileLogger();

		consoleLogger.setNext(fileLogger);
		return consoleLogger;
	}

}
